<?php
/**
 * Created by 陈俊伟.
 * User: Administrator
 * Date: 2019-10-28
 * Time: 下午 2:52
 */

namespace App\Lib\PHPExcel\ManuOrder;

use App\Lib\PHPExcel\ExcelHandle;

class Logistics extends ExcelHandle
{
    /*
     * 工厂模式
     * 物流格式定制
     * */
    public function arrange($origin_arr)
    {

        $arr = [
            0 => [
                '快递单号', '物流状态', '快递公司', '物流更新时间', '详细物流'
            ]
        ];
        $i = 1;
        foreach ($origin_arr as $data) {
            $arr[$i]['快递单号'] = $data['kddh'];
            $arr[$i]['物流状态'] = $data['wuliuzhuangtai'];
            $arr[$i]['快递公司'] = $data['kdgs'];
            $arr[$i]['物流更新时间'] = $data['zuixinshijian'];
            $arr[$i]['详细物流'] = $data['xiangxiwuliu'];

            $i++;
        }

        return $arr;
    }


}